$color-bg-chess-board: #fbbf24;
$color-chess-board: #b45309;

.chess-board {
  position: relative;
  padding: 2rem;
  border-radius: 1rem;
  background-color: $color-bg-chess-board;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.08);

  .item {
    text-align: center;
    vertical-align: middle;
    font-weight: 500;
    font-size: 0.875rem;
    color: $color-chess-board;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .board-top {
    position: absolute;
    top: 0.5rem;
    left: 2rem;
    right: 2rem;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
  }

  .board-left {
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    left: 0.75rem;
    display: grid;
    grid-template-rows: repeat(8, 1fr);
  }

  .board-right {
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    right: 0.75rem;
    display: grid;
    grid-template-rows: repeat(8, 1fr);
  }

  .board-bottom {
    position: absolute;
    bottom: 0.5rem;
    left: 2rem;
    right: 2rem;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
  }

  .board-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-gap: 0;
  }
}

@media (max-width: 36rem) {
  .chess-board {
    padding: 1.25rem;

    .item {
      font-size: 0.75rem;
    }

    .board-top {
      top: 0.125rem;
      left: 1rem;
      right: 1rem;
    }

    .board-left {
      top: 1rem;
      bottom: 1rem;
      left: 0.375rem;
    }

    .board-right {
      top: 1rem;
      bottom: 1rem;
      right: 0.375rem;
    }

    .board-bottom {
      bottom: 0.125rem;
      left: 1rem;
      right: 1rem;
    }
  }
}
